<template>
  <div class="box">
    <el-divider content-position="center">体温检测</el-divider>
    <div class="info-box" style="padding-bottom: 20px">
      <span>患病发热 :</span>&nbsp;&nbsp;
      <span>{{info.temperatureCheckArr&&info.temperatureCheckArr.length>0?'第'+info.temperatureCheckArr[0].dayNum+'天':'无'}}</span>
    </div>
    <div class="box-info" v-for="(item,index) in info.temperatureCheckArr" :key="index"
         v-if="info.temperatureCheckArr&&info.temperatureCheckArr.length>0">

      <div class="info-box">
        <span>日期 :</span>&nbsp;&nbsp;
        <div>{{ item.checkTime }}</div>
      </div>
      <div class="info-box">
        <span>时间 :</span>&nbsp;&nbsp;
        <div>{{ item.checkTimeHour }}</div>
      </div>

      <div class="box-info">
        <div class="info-box">
          <span>最高</span>&nbsp;&nbsp;
          <div>{{ item.temperatureNum }}</div>&nbsp;&nbsp;
          <span>℃</span>
        </div>
        <div class="info-box">
          <span>发热时是否咳嗽 :</span>&nbsp;&nbsp;
          <span>{{ item.coughStatus === 1 ? '是' : '否' }}</span>
        </div>
      </div>

    </div>

    <div class="box-info" v-if="!info.temperatureCheckArr||info.temperatureCheckArr.length===0">
      <div class="info-box">
        <span>患病发热 :</span>&nbsp;&nbsp;
        <span>无</span>
      </div>
      <div class="info-box">
        <span>日期 :</span>&nbsp;&nbsp;
        <div>无</div>
      </div>
      <div class="info-box">
        <span>时间 :</span>&nbsp;&nbsp;
        <div>无</div>
      </div>

      <div class="box-info">
        <div class="info-box">
          <span>最高 :</span>&nbsp;&nbsp;
          <div>无</div>&nbsp;&nbsp;
        </div>
        <div class="info-box">
          <span>发热时是否咳嗽 :</span>&nbsp;&nbsp;
          <span>无</span>
        </div>
      </div>

    </div>


  </div>
</template>

<script>
export default {
  data() {
    return {}
  },
  props: ['info']
}
</script>

<style scoped lang="less">
.box {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  color: #0c4070;

  .box-info {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;

    .info-box {
      width: 33%;
      display: flex;
      align-items: center;
      margin-bottom: 20px;
      box-sizing: border-box;

      .box-border {
        padding: 5px 10px;
        box-sizing: border-box;
        border: 1px solid #ccc;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .box-image {
        width: 50px;
        height: 50px;
        background-color: #d9d9d9;
      }
    }
  }
}
</style>
